Repository navigation
fix(android): keep a timed-out target probe from failing discovery of other devices - #4883
Conversation
Size Report
Startup median (7 runs, lower is better):
|
… other devices Fixes #4765 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1f22445 to
4e1dd89
Compare
|
This PR is ready at 4e1dd89: a timed-out target probe now degrades instead of failing discovery of the other devices. The review was read-only, so the new tests were not run. Not verified here: that the regression test fails on base c37bb95, which was checked by reading the code path, and live behavior on a loaded emulator host. No conflicts. The Body rules check shows as cancelled, not failed, and the diff touches no body or gate path, so re-running it should pass. One other check is still queued. Not blocking, and fine to take or leave: an Android TV or Fire TV device whose probe times out gets an undefined target, which selection reads as mobile (https://github.com/callstack/agent-device/blob/4e1dd89/packages/platform-android/src/inventory.ts#L236), so a follow-up could keep unknown-target devices out of default single-device auto-selection or show them in |
Apex Sentinel · ✅ Approve · review of
|
| Where | Finding |
|---|---|
packages/platform-android/src/inventory.ts:226 |
TV probe timeout demotes the device to mobile: --target tv misses it, wrong launcher category |
Reviewed with this repository's own Sentinel configuration (c37bb956307c).
💬 Talking to Sentinel
In a finding's thread, reply with:
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 4e1dd89. The verdict and the full list are in the summary comment.
… times out Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thanks. Pushed 7a4ff02: a timed-out target probe now fails discovery when it is the requested |
Summary
Android discovery probes every listed emulator's target (
getprop,has-feature,pm list features). A timeout on one busy emulator rejected the whole discovery, so it failed anopenfor a different device.A device whose target probe times out (typed
adbFailure: 'timeout') now stays listed with an unknown target. Unknown reads asmobilein selection. Discovery emits onewarndiagnostic,android_inventory_target_probe_failed, with the serial. The requested--serial, other failures, and request aborts still fail discovery, so a selected device never runs with a demoted target.Two files changed:
packages/platform-android/src/inventory.tsand its test. No new flags or modes.Fixes #4765
Before / after
pm list featuresforemulator-5554makes discovery reject, soemulator-5556is unreachable.emulator-5556has targetmobile, and a diagnostic names the slow device.Validation
pnpm vitest run packages/platform-android/src/inventory.test.ts: the new regression test fails on basec37bb95630source (rejects withadb timed out after 10000ms). It passes at head7a4ff0289d(19/19).pnpm typecheckandpnpm formatpass locally.🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.